#pragma once
#include "../mqcommon/mq_helper.hpp"
#include "../mqcommon/mq_logger.hpp"
#include "../mqcommon/mq_msg.pb.h"
#include <iostream>
#include <memory>
#include <unordered_map>
#include <mutex>
#include <cstring>
#include <functional>
namespace mymq
{
    using ConsumerCallBack = std::function<void(const std::string &, BasicProperties *bp, const std::string &)>;
    struct Consumer
    {
        using Ptr = std::shared_ptr<Consumer>;
        std::string _tag;   // 消费者标识
        std::string _qname; // 订阅的消息队列名字
        bool _auto_ack;     // 是否自动确认
        ConsumerCallBack _callback;
        Consumer(){}
        Consumer(const std::string &tag, const std::string &qname, bool auto_ack, ConsumerCallBack callback)
            : _tag(tag), _qname(qname), _auto_ack(auto_ack), _callback(callback)
        {}
        ~Consumer(){}
    };
}